<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="menu.jsp" />
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="css/my.css" />
<script type="text/javascript" src="js/jquery-3.2.0.min.js"></script>
</head>
<body>
	<h1 class="title">用户信息</h1>
	<form action="updateuserinfo" method="post">
		<table>
			<tr>
				<td>账号</td>
				<td><input type="text" name="username" disabled="disabled" value="${userinfo.username}"/></td>
				<td>用户名不能为空！</td>
			</tr>
			
			<tr>
				<td>Email</td>
				<td><input type="text" name="email" value="${userinfo.email}"/></td>
				<td>邮箱格式不正确！</td>
			</tr>
			<tr>
				<td>性别</td>
				<td colspan="2" style="text-align: left;">
					<input type="radio" name="sex" value="1" ${userinfo.gender==1?'checked':''}/>男 
					<input type="radio" name="sex" value="0" ${userinfo.gender==0?'checked':''}/>女</td>
			</tr>
			<tr>
				<td>关注类型</td>
				<td colspan="2">
					<input type="checkbox" name="type" value="法律规定"/>法律规定
					<input type="checkbox" name="type" value="管理办法" />管理办法 
					<input type="checkbox" name="type" value="决定条例" />决定条例 
					<input type="checkbox" name="type" value="细则解释" />细则解释 
					<input type="checkbox" name="type" value="规范指南" />规范指南
				</td>
			</tr>
			<c:forEach items="${types}" var="type">
				<script>					
					$("input[value='${type}']").attr("checked","checked");
				</script>
			</c:forEach>
			
			<tr>
				<td></td>
				<td>
					<a href="index.jsp"><input type="button" value="取消" onclick="javascript:location.href='index.jsp'"/></a>
					<input type="submit" value="修改" />
				<td>
				<td><td>
			</tr>
		</table>
	</form>
</body>
</html>